import copy
from .base_cfg import SEGMENTOR_CFG
from .._base_ import DATASET_CFG_CITYSCAPES_512x1024, DATALOADER_CFG_BS
import os

# deepcopy
SEGMENTOR_CFG = copy.deepcopy(SEGMENTOR_CFG)
# modify dataset config
SEGMENTOR_CFG['dataset'] = DATASET_CFG_CITYSCAPES_512x1024.copy()
SEGMENTOR_CFG['dataset']['rootdir'] = os.path.join(os.getcwd(), 'dataset/CityScapes')
# modify dataloader config
SEGMENTOR_CFG['dataloader'] = DATALOADER_CFG_BS.copy()
SEGMENTOR_CFG['dataloader']['train']['batch_size'] = 12
SEGMENTOR_CFG['dataloader']['test']['batch_size'] = 1
# modify scheduler config
SEGMENTOR_CFG['scheduler']['max_epochs'] = 420
SEGMENTOR_CFG['save_interval_epochs'] = 20
SEGMENTOR_CFG['eval_interval_epochs'] = 20
SEGMENTOR_CFG['log_interval_iterations'] = 100
# modify other segmentor configs
SEGMENTOR_CFG['num_classes'] = 19
SEGMENTOR_CFG['work_dir'] = 'output/SCTNet_cityscapes'
SEGMENTOR_CFG['logfilepath'] = 'output/SCTNet_cityscapes/SCTNet_cityscapes.log'
SEGMENTOR_CFG['resultsavepath'] = 'output/SCTNet_cityscapes/SCTNet_cityscapes.pkl'
